package com.iwe.crm.base.util;

import com.iwe.crm.user.bean.User;

import javax.servlet.http.HttpSession;
import java.util.Locale;
import java.util.UUID;

public class CommonUtil {
    //获取当前登录用户
    public static User getCurrentUser(HttpSession session){
        return (User)session.getAttribute("user");
    }

    //生成UUID主键
    public static String uuid(){
        return UUID.randomUUID().toString()
                .toLowerCase().replace("-","");
    }
}
